//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __CBASICFILESYSTEM_H__
#define __CBASICFILESYSTEM_H__

#define _NO_CKTFSFILESYSTEM_CLASSOBJECT_

#include <elasys_server.h>
#include "_CKtfsFileSystem.h"

class CKtfsFileSystem : public _CKtfsFileSystem
{
public:
    CARAPI Sync();

    CARAPI GetRoot(
        /* [out] */ IBasicDirectory * * piRoot);

    CARAPI Lookup(
        /* [in] */ WString pathname,
        /* [out] */ IBasicFile * * piBasicFile);

    CARAPI GetStat(
        /* [out] */ FileSystemStat * pFileSystemStat);

    CARAPI BindDriver(
        /* [in] */ WString wstrDevName);

    CARAPI UnbindDriver();

public:
    CKtfsFileSystem(): m_pDiskName(NULL), m_pRootDir(NULL) {}
    ~CKtfsFileSystem();
    ECode Initialize(wchar_t *wcsDisk);

private:
    wchar_t * m_pDiskName;

private:
    Interlocked m_cRef;
    IBasicDirectory *m_pRootDir;
    
};

#endif //!(__CBASICFILESYSTEM_H__)
